﻿using System.Drawing;
using WorldModels.Terrains;

namespace WorldModels.WorldModels
{
    /// <summary>
    /// Represents a single level model.
    /// </summary>
    public class LevelModel : ILevelModel
    {
        public Size LevelSize { get; private set; }

        public ITerrain[][] Level { get; private set; }

        public LevelModel(Size levelSize)
        {
            LevelSize = levelSize;
            Level = new ITerrain[levelSize.Width][];
            for (int i = 0; i != levelSize.Width; ++i)
            {
                Level[i] = new ITerrain[levelSize.Height];
            }
        }

        public void SetCell(ITerrain terrain, int x, int y)
        {
            Level[x][y] = terrain;
        }
    }

}